package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StuCompetitionMapper;
import com.ruoyi.system.domain.StuCompetition;
import com.ruoyi.system.service.IStuCompetitionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 竞赛获奖Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-09
 */
@Service
public class StuCompetitionServiceImpl implements IStuCompetitionService 
{
    @Autowired
    private StuCompetitionMapper stuCompetitionMapper;

    /**
     * 查询竞赛获奖
     * 
     * @param comId 竞赛获奖主键
     * @return 竞赛获奖
     */
    @Override
    public StuCompetition selectStuCompetitionByComId(Long comId)
    {
        return stuCompetitionMapper.selectStuCompetitionByComId(comId);
    }

    /**
     * 查询竞赛获奖列表
     * 
     * @param stuCompetition 竞赛获奖
     * @return 竞赛获奖
     */
    @Override
    public List<StuCompetition> selectStuCompetitionList(StuCompetition stuCompetition)
    {
        return stuCompetitionMapper.selectStuCompetitionList(stuCompetition);
    }

    /**
     * 新增竞赛获奖
     * 
     * @param stuCompetition 竞赛获奖
     * @return 结果
     */
    @Override
    public int insertStuCompetition(StuCompetition stuCompetition)
    {
        return stuCompetitionMapper.insertStuCompetition(stuCompetition);
    }

    /**
     * 修改竞赛获奖
     * 
     * @param stuCompetition 竞赛获奖
     * @return 结果
     */
    @Override
    public int updateStuCompetition(StuCompetition stuCompetition)
    {
        return stuCompetitionMapper.updateStuCompetition(stuCompetition);
    }

    /**
     * 批量删除竞赛获奖
     * 
     * @param comIds 需要删除的竞赛获奖主键
     * @return 结果
     */
    @Override
    public int deleteStuCompetitionByComIds(String comIds)
    {
        return stuCompetitionMapper.deleteStuCompetitionByComIds(Convert.toStrArray(comIds));
    }

    /**
     * 删除竞赛获奖信息
     * 
     * @param comId 竞赛获奖主键
     * @return 结果
     */
    @Override
    public int deleteStuCompetitionByComId(Long comId)
    {
        return stuCompetitionMapper.deleteStuCompetitionByComId(comId);
    }
}
